package org.yxing.palpalgps.activity;

import org.yxing.palpalgps.AbstractActivity;
import org.yxing.palpalgps.R;
import org.yxing.palpalgps.domain.UserInfo;
import org.yxing.palpalgps.utils.ConfigHelper;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class SeekSettingActivity extends AbstractActivity implements OnClickListener {
    
    private TextView genderView;
    
    private UserInfo user;
    
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.seek_setting);
        setTitle(getString(R.string.seek_setting));
        
        user = ConfigHelper.getNowUser();
        genderView = (TextView) findViewById(R.id.genderView);
        
        Integer[] rowIds = {R.id.genderRow, R.id.ageRow};
        for (int resId : rowIds) {
            findViewById(resId).setOnClickListener(this);
        }
        
        showProfile();
    }
    
    private void showProfile() {
        genderView.setText(user.getGender().equals("m") ? getString(R.string.male) : getString(R.string.female));
    }

    public void onClick(View v) {
        
    }
}
